package com.yunchao.feature.lock.domain.repository

import com.yunchao.feature.lock.domain.model.LockInfoModel
import com.yunchao.library.lock.LockEPCInfo

internal interface LockHandleRepository {

    /**
     * 单次扫描
     */
    suspend fun inventoryOnce(): Result<LockInfoModel>

    suspend fun inventoryOnceAndLogCount():Result<LockInfoModel>


    /**
     * 开锁
     */
    suspend fun openLock(
        lockEPCInfo: LockEPCInfo,
        deviceId: Int,
        operatorId: Int,
        chkUserId: Int,
        pageNumber: Int
    ): Result<LockInfoModel>

    /**
     * 闭锁
     */
    suspend fun closeLock(
        lockEPCInfo: LockEPCInfo,
        deviceId: Int,
        operatorId: Int,
        chkUserId: Int,
        pageNumber: Int
    ): Result<LockInfoModel>

    /**
     * 开锁
     */
    suspend fun openLockLogistics(
        lockEPCInfo: LockEPCInfo,
        deviceId: Int,
        operatorId: Int,
        chkUserId: Int,
        pageNumber: Int
    ): Result<LockInfoModel>

    /**
     * 闭锁
     */
    suspend fun closeLockLogistics(
        lockEPCInfo: LockEPCInfo,
        deviceId: Int,
        operatorId: Int,
        chkUserId: Int,
        pageNumber: Int
    ): Result<LockInfoModel>


    /**
     * 恢复锁
     */
    suspend fun recoveryLock(
        lockEPCInfo: LockEPCInfo,
        deviceId: Int,
        operatorId: Int,
        chkUserId: Int,
    ): Result<LockInfoModel>

    /**
     * 清理锁
     */
    suspend fun cleanLock(
        lockEPCInfo: LockEPCInfo,
        deviceId: Int,
        operatorId: Int,
        chkUserId: Int,
        pageNumber: Int
    ): Result<LockInfoModel>


    /**
     * 读取锁物流日志
     */
    suspend fun readLockLogistics(): Result<LockInfoModel>

    /**
     * 读取锁日志
     */
    suspend fun readLockLog(lockEPCInfo: LockEPCInfo,  start: Int,number: Int): Result<LockInfoModel>
}